package com.sn.shop.enums;

/**
 * @auther sn
 * @date 2018/1/24
 * @description TODO
 */
public enum ResultStatus {
    OK(200, "成功"),
    ERROR(400, "失败"),
    ILLEGAL_IDENTITY(401, "身份凭证已过期,需要重新登陆"),
    USERNAME_NOT_FOUND(402, "用户名不存在"),
    BAD_CREDENTIALS(403, "密码错误"),
    PARAMETER_REQUIRED(302, "关键参数缺失"),
    OTHER_ERROR(303, "系统内部异常");

    private int code;
    private String desc;

    ResultStatus(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
